let model = require("../model/userTable");//引入表

module.exports = {
    total: (params) => {
        return model.find(params).count()
    },
    query: (params, skip, limit) => {
        return model.find(params).skip(skip).limit(limit)
    },
    add: (data) => {
        return model.insertMany([data]);
    },
    del: (data) => {
        return model.remove(data)
    },
    update: (data, newdata) => {
        return model.updateOne(data, newdata)
    },
    addmany: (data) => {
        return model.insertMany(data);
    }
}